package com.dys.entity;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @className: com.dys.entity.PageBean
 * @description: com.dys.entity
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/09/25 20:31
 */
public class PageBean<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 当前页数据
     */
    private List<T> data;

    /**
     * 查询出的总记录数
     */
    private int totalSize;

    /**
     * 总页数
     */
    private int totalPage;

    /**
     * 当前页
     */
    private int currentPage;

    /**
     * 页大小
     */
    private int pageSize;

    public PageBean() {
    }

    public PageBean(List<T> data, int totalSize, int totalPage, int currentPage, int pageSize) {
        this.data = data;
        this.totalSize = totalSize;
        this.totalPage = totalPage;
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
